package com.bw.zuoye0722.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

class FragmentAdapter(
    frgmentActivity: FragmentActivity,
    var list: MutableList<Fragment> = mutableListOf()
):FragmentStateAdapter(frgmentActivity) {
    override fun getItemCount(): Int {
        return list.size
    }

    override fun createFragment(position: Int): Fragment {
       return list[position]
    }
}